Add some more gsk tests
authorMatthias Clasen <mclasen@redhat.com>
Thu, 1 Apr 2021 21:00:31 +0000 (17:00 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 2 Apr 2021 00:06:40 +0000 (20:06 -0400)
The css-background test contains a node pattern that
is optimized in the ngl renderer.

testsuite/gsk/compare/borders-scaled.node [new file with mode: 0644]
testsuite/gsk/compare/borders-scaled.png [new file with mode: 0644]
testsuite/gsk/compare/css-background.node [new file with mode: 0644]
testsuite/gsk/compare/css-background.png [new file with mode: 0644]
testsuite/gsk/meson.build

diff --git a/testsuite/gsk/compare/borders-scaled.node b/testsuite/gsk/compare/borders-scaled.node
new file mode 100644 (file)
index 0000000..c5583b9
--- /dev/null
@@ -0,0 +1,13 @@
+transform {
+  child: container {
+    border {
+      outline: 5 5 50 50;
+    }
+    color {
+      color: rgba(0, 0, 0, 0);
+      bounds: 0 0 110 110;
+    }
+  }
+
+  transform: translate(110, 0) scale(3,3);
+}
diff --git a/testsuite/gsk/compare/borders-scaled.png b/testsuite/gsk/compare/borders-scaled.png
new file mode 100644 (file)
index 0000000..21c701e
Binary files /dev/null and b/testsuite/gsk/compare/borders-scaled.png differ
diff --git a/testsuite/gsk/compare/css-background.node b/testsuite/gsk/compare/css-background.node
new file mode 100644 (file)
index 0000000..5859a60
--- /dev/null
@@ -0,0 +1,61 @@
+transform {
+  transform: scale(16,16);
+  child: container {
+
+    clip {
+      clip: 0 0 30 30;
+      child: container {
+        rounded-clip {
+          clip: 5 5 50 50 / 5;
+          child: color {
+            color: rgba(255, 0, 0, 255);
+            bounds: 5 5 50 50;
+          }
+        }
+        border {
+          outline: 5  5 50 50 / 5;
+          widths: 3;
+          colors: yellow;
+        }
+      }
+    }
+
+    debug {
+      message: "Clipped-out area";
+      child: container {
+
+        color {
+          color: black;
+          bounds: 7 5 5 1;
+        }
+
+        color {
+          color: black;
+          bounds: 6 6 2 1;
+        }
+
+        color {
+          color: black;
+          bounds: 5 7 2 1;
+        }
+
+        color {
+          color: black;
+          bounds: 5 8 1 3;
+        }
+
+        color {
+          color: black;
+          bounds: 8 8 1 3;
+        }
+
+        color {
+          color: black;
+          bounds: 8 8 3 1;
+        }
+      }
+    }
+  }
+}
+
+
diff --git a/testsuite/gsk/compare/css-background.png b/testsuite/gsk/compare/css-background.png
new file mode 100644 (file)
index 0000000..a7c4666
Binary files /dev/null and b/testsuite/gsk/compare/css-background.png differ
index edb06ad154fe9d9f7285cff5825086b90b24f1e7..189621cb749a80bcd75150e62ccb171865559739 100644 (file)
@@ -28,6 +28,7 @@ compare_render_tests = [
   'color-blur0',
   'color-matrix-identity',
   'cross-fade-in-opacity',
+  'css-background',
   'empty-blend',
   'empty-blur',
   'empty-border',
@@ -68,6 +69,7 @@ compare_render_tests = [
   'repeat-negative-coords',
   'inset-shadow-multiple',
   'borders-rotated',
+  'borders-scaled',
   'blend-invisible-child',
   'transform-in-transform',
   'transform-in-transform-in-transform',